﻿<h2>People</h2>

<form class="form-inline" data-ng-submit="savePerson()">
    <label>Name</label>
    <input type="text" data-ng-model="edit.Name"/>
    <label>Age</label>
    <input type="number" data-ng-model="edit.Age" />
    <button type="submit" class="btn btn-primary"><i class="icon-ok"></i></button>
    <a class="btn" data-ng-click="cancelEdit()" data-ng-disabled="!editMode"><i class="icon-remove"></i></a>
</form>

<table class="table">
    <thead>
        <tr>
            <th>Id</th>
            <th>Name</th>
            <th>Age</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <tr data-ng-repeat="person in people">
            <td>{{person.Id}}</td>
            <td>{{person.Name}}</td>
            <td>{{person.Age}}</td>
            <td>
                <div class="btn-group">
                    <button class="btn" data-ng-click="editPerson(person)"><i class="icon-edit"></i></button>
                    <button class="btn" data-ng-click="removePerson(person)"><i class="icon-remove"></i></button>
                </div>
            </td>
        </tr>
    </tbody>
</table>
